import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { knowledge, system, aiqa } from '@/api/apiModulesType';
// 查询团队文档查询权限角色
export function apiTeamRoleQuery(params) {
  return request({
    url: `${knowledge}/api/teamRole/query`,
    method: 'get',
    params
  });
}
// 新增团队文档权限角色
export function apiTeamRoleAdd(data) {
  return request({
    url: `${knowledge}/api/teamRole/add`,
    method: 'post',
    data
  });
}

//修改团队文档角色
export function apiTeamRoleUpdateUserRoleType(data) {
  return request({
    url: `${knowledge}/api/teamRole/updateUserRoleType`,
    method: 'post',
    data
  });
}

//删除团队文档角色
export function apiTeamRoleDelete(data) {
  return request({
    url: `${knowledge}/api/teamRole/delete`,
    method: 'post',
    data
  });
}

//查询自己在团队的权限
export function apiTeamMemberQueryMemberRole(params) {
  return request({
    url: `${knowledge}/api/teamMember/queryMemberRole`,
    method: 'get',
    params
  });
}
//查询自己在团队文件的权限
export function apiTeamRelevanceRoleQueryPermByUser(data) {
  return request({
    url: `${knowledge}/api/teamRelevanceRole/queryPermByUser`,
    method: 'post',
    data
  });
}

// 查询团队类型
export function apiTeamTypeQuery(params) {
  return request({
    url: `${knowledge}/api/team/getTypeById`,
    method: 'get',
    params
  });
}
export default {
  apiTeamRoleQuery,
  apiTeamRoleAdd,
  apiTeamRoleUpdateUserRoleType,
  apiTeamRoleDelete,
  apiTeamMemberQueryMemberRole,
  apiTeamRelevanceRoleQueryPermByUser,
  apiTeamTypeQuery
};
